
import Vue from 'vue'

const Shop = {

}

Shop._vm = new Vue({
  data () {
    return {
      $$state: []
    }
  },
  computed: {
    items () {
      return this.$$state
    }
  }
})

function add (product) {
  Shop._vm.$data.$$state.push(product)
}

function items () {
  return Shop._vm.$data.$$state
}

export { add, items }
export function clear () {
  Shop._vm.$data = []
}

// export { items: Shop._vm.$data }

export default Shop
